import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../../../common/index.dart';
import '../../../global.dart';
import '../index.dart';

/// hello
class HelloWidget extends GetView<LoginController> {
  const HelloWidget({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Center(
      child: TextButton(
          onPressed: () async {
            await UserStore.to.setToken('value');
            Get.offNamed(AppRoutes.INITIAL);
            const RouteSettings(name: AppRoutes.INITIAL);
            Global.initBaseController();
          },
          child: Text('登录')),
    );
  }
}
